package com.gzp.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.alibaba.dubbo.config.annotation.Reference;
import com.gzp.pojo.UserAddress;
import com.gzp.service.OrderService;
import com.gzp.service.UserService;

/**
 * 注入的对象上使用注解com.alibaba.dubbo.config.annotation.Reference
 * 
 * @author gzp
 *
 */
@Service
public class OrderServiceAnnotationImpl implements OrderService {

//	@Reference(url="dubbo://127.0.0.1:20890") // 不使用注册中心注入，需指定提供者url
	@Reference
	private UserService userService;

//	public void setUserService(UserService userService) {
//		this.userService = userService;
//	}

	@Override
	public List<UserAddress> initOrder(String userId) {
		return userService.findAllAddress(userId);
	}

}
